package com.yangrong.thread.chapter5;

/**
 * 单线程执行设计模式有一个门始终只能一个人通过
 * 
 * @author YangRong
 * @date 2020年6月8日
 */
public class Client {

	public static void main(String[] args) {
		Gate gate = new Gate();
		User bj = new User("Baobao", "Beijing", gate);
		User sh = new User("ShangLao", "ShangHai", gate);
		User gz = new User("GuangLao", "GuangZhou", gate);

		bj.start();
		sh.start();
		gz.start();
	}

}
